﻿using System.Data.Entity.ModelConfiguration;
using Wamm.Model.Entities;

namespace Wamm.EntityFrameworkImplementation.EntityConfigurations {
    public class PersonConfiguration : EntityConfiguration<Person> {
        public PersonConfiguration()
        {
            this.Property(p => p.FirstName).IsRequired();
            this.Property(p => p.LastName).IsRequired();
            this.Property(p => p.AddedBy).IsRequired();
            this.Property(p => p.LastUpdatedBy).IsRequired();
            // the following are required due to using a not nullable data type:
            // Id
            // Guest
            // PrimaryContactForFamily
            // Archived
            // Added
            // LastUpdated
        }
    }
}
